export default {
  getThumb (param = {}) {
    let url = process.env.VUE_APP_getThumb_url
    let baseurl = process.env.VUE_APP_baseurl
    return window.axios.post(url, param).then(ret => {
      if (ret.code == 0) {
        return baseurl + ret.data
      } else {
        return baseurl + ret.param.url
      }
    }).catch(() => { })
  },
  getTypes (arr = [], moduleName = '') {
    return arr.filter(item => item.module_name == moduleName)
  }
}